from typing import List, TypedDict, Literal, Dict, Union
from pydantic import BaseModel

class BasicInfo(BaseModel):
    chapter_title: str
    section_title: str
    subsection_title: str
    subsection_number: int

class Question(BaseModel):
    question: str
    options: List[str]
    correctAnswerIndex: int
    explanation: str

class Quiz(BaseModel):
    basic_info: BasicInfo
    content: List[Question]
    
"""
basic_info
{
    chpater_title: '',
    section_title: '',
    subsection_title: '',
    subsection_number: ''
}

content
[
    {
        "question": "以下哪项是企业的根本特征之一？",
        "options": ["企业的目的是获得不断增加盈利。", "企业是政府行政管理机构的附属物。", "企业没有义务无偿承担各种非企业性职能。", "企业是一个经济组织，而且是独立的经济组织。"],
        "correctAnswerIndex": 0,
        "explanation": "企业的根本特征之一是获得不断增加盈利，自负盈亏，是企业得以不断发展的内在要求。"
    }
]

"""